package com.ecity.panels 
{
	import com.ecity.events.PageEvent;
	import org.papervision3d.objects.DisplayObject3D;
	import org.papervision3d.objects.primitives.Plane;
	
	/**
	 * ...
	 * @author Yicheng.Zhang
	 */
	public class MenuPlane extends Plane {
		
		public function MenuPlane()	{
			super(null, 1, 1);
		}
		
		public function addSinglePlane(child:DisplayObject3D,name:String,index:int):void {
			this.addChild(child, name);
			child.addEventListener(PageEvent.MENU_CLICK, onPageMenuClicked);
		}
		
		private function onPageMenuClicked(e:PageEvent):void {
			this.dispatchEvent(new PageEvent(PageEvent.MENU_CLICKED));
		}
		
	}

}